﻿<ResourceDictionary 
	xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
	xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
    xmlns:Microsoft_Windows_Themes="clr-namespace:Microsoft.Windows.Themes;assembly=PresentationFramework.Classic" 
	xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
	xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
	xmlns:Controls="clr-namespace:PSE.Deployment.ConfigurationManager.Controls;assembly=PSE.Deployment.ConfigurationManager.Controls"
    xmlns:SetupControls="clr-namespace:PSE.Deployment.SetupBase.UI;assembly=PSE.Deployment.SetupBase"
	xmlns:UI="clr-namespace:PSE.Deployment.ConfigurationManager.UI;assembly=PSE.Deployment.ConfigurationManager.UI">
    
    <Style x:Key="BaseWindowStyle" TargetType="SetupControls:BaseWindow">
        <Setter Property="Width" Value="960" />
        <Setter Property="Height" Value="700" />
        <Setter Property="BorderThickness" Value="0" />
        <Setter Property="WindowStyle" Value="None" />
        <Setter Property="SnapsToDevicePixels" Value="True" />
        <Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Disabled" />
        <Setter Property="ResizeMode" Value="NoResize" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="SetupControls:BaseWindow">
                    <Grid Background="{DynamicResource WindowBackground}">
                        <Grid.RowDefinitions>
                            <RowDefinition Height="130"/>
                            <RowDefinition Height="*"/>
                        </Grid.RowDefinitions>
                        <Border Grid.RowSpan="2" HorizontalAlignment="Stretch" Margin="0,0,0,0" VerticalAlignment="Stretch" BorderBrush="#FF373737" BorderThickness="2,2,2,2" />
                        <Rectangle Grid.Row="0" x:Name="BackgroundLogo" Fill="{DynamicResource SystemLogo}" />
                        <ContentPresenter Grid.Row="0" Grid.RowSpan="2" Content="{TemplateBinding ContentControl.Content}" ContentTemplate="{TemplateBinding ContentControl.ContentTemplate}" />
                    </Grid>
                    <ControlTemplate.Triggers>
                        <Trigger Property="ShowBackgroundLogo" Value="False">
                            <Setter Property="Visibility" Value="Collapsed" TargetName="BackgroundLogo"/>
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    
    <Style x:Key="BaseWizardWindowStyle" TargetType="{x:Type SetupControls:BaseWizardWindow}" BasedOn="{StaticResource BaseWindowStyle}" />

    <!-- INI CONFIGURATION MANAGER -->
	<HierarchicalDataTemplate x:Key="ConfiguratorItemTemplate" ItemsSource="{Binding Children, Mode=OneTime}">
		<StackPanel Orientation="Horizontal">
			<Label Content="{Binding Header, Mode=OneTime}" Margin="2,0"/>
		</StackPanel>
	</HierarchicalDataTemplate>
	<Style x:Key="WindowBaseStyle" TargetType="UI:WindowBase">
		<Setter Property="Width" Value="800" />
		<Setter Property="Height" Value="600"/>
		<Setter Property="SnapsToDevicePixels" Value="True" />
		<Setter Property="Template">
			<Setter.Value>
				<ControlTemplate TargetType="UI:WindowBase">
					<Grid>
						<Grid Background="{DynamicResource WindowBackground}">
							<Grid.ColumnDefinitions>
								<ColumnDefinition Width="Auto" MinWidth="210"/>
								<ColumnDefinition Width="*"/>
							</Grid.ColumnDefinitions>
							<Grid.RowDefinitions>
								<RowDefinition Height="50"/>
								<RowDefinition Height="*"/>
							</Grid.RowDefinitions>
							<Controls:ScreenTitle x:Name="PART_ScreenTitle" Grid.Row="0" Grid.ColumnSpan="2" Style="{DynamicResource ConfigurationTitle}"/>
							<TreeView x:Name="PART_mainTreeView" Grid.Row="1" Grid.Column="0" Style="{DynamicResource TreeViewConfiguration}" Width="Auto" Height="Auto" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" ItemContainerStyle="{DynamicResource TreeViewItemConfiguration}" ItemTemplate="{DynamicResource ConfiguratorItemTemplate}" Margin="6,6,3,6"/>
							<Border Grid.Row="1" Grid.Column="1" BorderBrush="#FF8E99AD" BorderThickness="1,1,1,1" x:Name="PART_contentPresenter" Margin="3,6,6,6" CornerRadius="6,6,6,6">
								<Border.Background>
									<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
										<GradientStop Color="#7FFFFFFF" Offset="0"/>
										<GradientStop Color="#7F8E99AD" Offset="0.35"/>
									</LinearGradientBrush>
								</Border.Background>
							</Border>
						</Grid>
						<Grid x:Name="PART_LoadingPanel" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Background="#33000000" Visibility="Collapsed">
							<Rectangle HorizontalAlignment="Center" VerticalAlignment="Center" Width="100" Height="35" Stroke="#FFC1C1C1" RadiusX="8" RadiusY="8">
								<Rectangle.Fill>
									<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
										<GradientStop Color="#FF2F2F2F" Offset="1"/>
										<GradientStop Color="#FF999999" Offset="0"/>
									</LinearGradientBrush>
								</Rectangle.Fill>
							</Rectangle>
							<TextBox HorizontalAlignment="Center" VerticalAlignment="Center" Text="Processando..." TextWrapping="Wrap" Foreground="#FFFFFFFF" Background="{x:Null}" BorderBrush="{x:Null}"/>
						</Grid>
					</Grid>
				</ControlTemplate>
			</Setter.Value>
		</Setter>
	</Style>
	<!-- FIM CONFIGURATION MANAGER -->
</ResourceDictionary>